package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        //FileInputStream fis = new FileInputStream("writeTest.txt");
        FileOutputStream fos = new FileOutputStream("writeTest.txt",false);
        String line = "智慧是第一基础,决定上限\n";
        byte[] bytes = line.getBytes(StandardCharsets.UTF_8);
        fos.write(bytes);
        String line1 = "行动力和自制力决定成长的顺利\n";
        bytes = line1.getBytes(StandardCharsets.UTF_8);
        fos.write(bytes);
        fos.close();
    }
}
